﻿@model List<HouseCrawler.Web.Models.HouseDashboard>
@using HouseCrawler.Web;

<!doctype html>
<html class="no-js" lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>地图搜租房</title>
    <meta name="description" content="写点什么好呢？鬼知道呀！" />
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="renderer" content="webkit">
    <meta name="google-site-verification" content="Q0y5SjnUTFOeVLdR_mexdtKu7n8fWICNSr0F1_4LA88" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="~/hometemplate/views/IMJ2V2/css/amazeui.min.css">
    <link rel="stylesheet" href="~/hometemplate/views/IMJ2V2/css/style.css"  />
    <script src="~/DomainJS/umeng.js"></script>
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="http://apps.bdimg.com/libs/html5shiv/3.7/html5shiv.min.js"></script>
    <script src="http://apps.bdimg.com/libs/respond.js/1.4.2/respond.js"></script>

    <![endif]-->
</head>
<!--[if lt IE 9]>
<div class="am-modal am-modal-no-btn am-modal-active" tabindex="-1" id="doc-modal-1" style="display: block; width: 400px; margin-left: -200px; margin-top: -112px;">
<div class="am-modal-dialog">
<div class="am-modal-hd">365 安全卫士提醒</div>
<div class="am-modal-bd">你的浏览器太古董了，还不换一个你就奥特曼了
    <a href="http://browsehappy.com/" target="_blank" class="am-btn am-btn-danger am-btn-sm am-radius" rel="nofollow">速速点击换一个</a>
    </div>
</div>
</div>
<![endif]-->
<body>
    <header class="m-hd">
        <section data-am-sticky class="am-show-md-up">
            <div class="am-container">
                <a href="/" rel="nofollow" class="home-a">房子是租来的,而生活不是。</a>
                <!--        <ul class="am-fr m-about">
            <li><a href="/about/" class="am-btn am-btn-danger am-btn-sm am-radius" rel="nofollow">关于我们</a></li>
            <li><a href="/contact/" class="am-btn am-btn-danger am-btn-sm am-radius" rel="nofollow">联系我们</a></li>
        </ul> -->
                <nav>
                    <ul class="m-nav am-nav am-nav-pills am-fr">
                        <li><a href="/" rel="nofollow">网站首页</a></li>
                        <li class="am-dropdown" data-am-dropdown>
                            <a href="#" rel="nofollow" class="am-dropdown-toggle" data-am-dropdown-toggle>热门城市 <span class="am-icon-caret-down"></span></a>
                            <ul class="am-dropdown-content" >
                                <li><a href="~/Home/HouseList?cityname=上海" target="_blank" rel="nofollow">上海</a></li>
                                <li><a href="~/Home/HouseList?cityname=北京" target="_blank" rel="nofollow">北京</a></li>
                                <li><a href="~/Home/HouseList?cityname=广州" target="_blank" rel="nofollow">广州</a></li>
                                <li><a href="~/Home/HouseList?cityname=深圳" target="_blank" rel="nofollow">深圳</a></li>
                                <li><a href="~/Home/HouseList?cityname=杭州" target="_blank" rel="nofollow">杭州</a></li>
                                <li><a href="~/Home/HouseList?cityname=南京" target="_blank" rel="nofollow">南京</a></li>
                                <li><a href="~/Home/HouseList?cityname=武汉" target="_blank" rel="nofollow">武汉</a></li>
                                <li><a href="~/Home/HouseList?cityname=成都" target="_blank" rel="nofollow">成都</a></li>
                                <li><a href="~/Home/HouseList?cityname=厦门" target="_blank" rel="nofollow">厦门</a></li>
                                <li><a href="~/Home/HouseList?cityname=苏州" target="_blank" rel="nofollow">苏州</a></li>
                            </ul>
                        </li>
                        <li class="am-dropdown" data-am-dropdown>
                            <a href="#" rel="nofollow" class="am-dropdown-toggle" data-am-dropdown-toggle>个人中心<span class="am-icon-caret-down"></span></a>
                            <ul class="am-dropdown-content">
                                @if(!string.IsNullOrEmpty(ViewBag.UserName))
                                {
                                    <li class="am-dropdown" data-am-dropdown>
                                        <a  href="javascript: void(0)" rel="nofollow" id="userCenter">房源看板</a>
                                    </li>
                                    <li class="am-dropdown" data-am-dropdown>
                                        <a  href="javascript: void(0)" rel="nofollow" id="userHouseList">收藏列表</a>
                                    </li>
                                    <li class="am-dropdown" data-am-dropdown>
                                        <a  href="/Account/GetOAuthQQUrl" rel="nofollow" target="_blank">绑定QQ</a>
                                    </li>

                                     <li class="am-dropdown" data-am-dropdown>
                                         <a href="#" data-am-modal="{target: '#setWorkAddress', closeViaDimmer: 0 ,width: 400,}">设置地址</a>
                                    </li>

                                  
                                    <li class="am-dropdown" data-am-dropdown>
                                        <a  href="javascript: void(0)" rel="nofollow" id="userSignOut">退出登录</a>
                                    </li>
                                }else{
                                    <li class="am-dropdown" data-am-dropdown>
                                        <a rel="nofollow" href="~/Account/GetOAuthQQUrl">QQ登录</a>
                                    </li>
                                    <li class="am-dropdown" data-am-dropdown>
                                        <a rel="nofollow" href="~/Account">邮箱登录</a>
                                    </li>
                                    <li class="am-dropdown" data-am-dropdown>
                                        <a rel="nofollow" href="~/Account/Register">注册账号</a>
                                    </li>
                                }
                            
                            </ul>
                        </li>
                        <li class="am-dropdown" data-am-dropdown>
                            <a href="#" rel="nofollow" class="am-dropdown-toggle" data-am-dropdown-toggle>使用说明<span class="am-icon-caret-down"></span></a>
                            <ul class="am-dropdown-content">
                                 <li><a href="https://github.com/liguobao/58HouseSearch/blob/master/%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B.md" rel="nofollow" target="_blank">使用教程</a></li>
                                 <li><a href="https://github.com/liguobao/58HouseSearch/blob/master/%E4%B8%80%E4%BA%9B%E6%8A%80%E5%B7%A7.md" rel="nofollow" target="_blank">一些技巧</a></li>
                                 <li><a href="https://github.com/liguobao/58HouseSearch/blob/master/%E6%97%A5%E5%B8%B8%E6%9B%B4%E6%96%B0.md" rel="nofollow" target="_blank">更新日志</a></li>
                                 <li><a href="#divContactLiguobao" rel="nofollow">联系我？</a></li>
                            </ul>
                        </li>
                       
                    </ul>
                </nav>
            </div>
        </section>

      

       
        <nav data-am-widget="header" class="am-header am-show-sm-only">
            <div class="am-header-left am-header-nav">
                <a href="/" rel="nofollow">
                    <i class="am-header-icon am-icon-home"></i> 首页
                </a>
            </div>
            <h1 class="am-header-title">
                <a href="/" rel="nofollow">地图搜租房</a>
            </h1>
            <div class="am-header-right am-header-nav">
                <a href="#right-link" class="" data-am-offcanvas="{target: '#r-nav'}">
                    <i class="am-header-icon am-icon-bars"></i> 菜单
                </a>
            </div>
        </nav>

        <!-- 侧边栏内容 -->
        <div id="r-nav" class="am-offcanvas">
            <div class="am-offcanvas-bar am-offcanvas-bar-flip">
                <nav class="am-offcanvas-content">
                    <a href="/" rel="nofollow"><span class="logo"></span></a>
                    <p><i class="am-icon-home"></i> <a href="/" rel="nofollow">网站首页</a></p>
                    <p><i class="am-icon-user"></i><a  href="javascript: void(0)" rel="nofollow" id="userCenter">个人中心</a></p>
                    <p><i class="am-icon-sign-in"></i> <a href="/Account" rel="nofollow">注册/登录</a></p>
                    <p><i class="am-icon-list"></i> <a href="#" rel="nofollow">城市列表</a></p>

                    @foreach (var cityGroup in Model.GroupBy(c => c.CityName))
                    {
                        var cityName = cityGroup.First().CityName;
                        <p><a href="/Home/HouseList?cityname=@cityName" target="_blank">@cityName</a></p>
                   }
                </nav>
            </div>
        </div>
    </header>
    <div data-am-widget="slider" class="am-slider am-slider-i2" data-am-flexslider="{controlNav:false}">
        <ul class="am-slides">
            <li class="am-slider-images" style="background-image: url(/hometemplate/views/IMJ2V2/images/banner1.jpg)">
                <div class="am-container am-slider-desc">
                    <div class="am-slider-content">
                        <h2 class="am-slider-title am-animation-slide-left" data-am-scrollspy="{animation: 'slide-left', delay: 100}">满大街找租房心力交瘁？试试换个方式直接在地图上搜租房吧。</h2>
                        <p data-am-scrollspy="{animation:'slide-right', delay: 600}" class="am-animation-slide-right">房源爬虫 + 高德地图强力驱动,帮助你迅速找到合适房源.</p>
                        <a href="#read-more" class="am-btn-xs  am-btn am-btn-danger am-radius am-animation-slide-bottom am-animation-delay-1" rel="nofollow" data-am-scrollspy="{animation:'slide-bottom', delay: 100}">马上开始！</a>
                    </div>
                </div>
            </li>
        </ul>
    </div>
    <div id="read-more" class="m-services m-home-box">
        @* 用于锚点定位的...感觉有点傻。 *@
    </div>
    <div class="m-services m-home-box">
        <section class="am-container">
            <hgroup class="am-animation-slide-top" data-am-scrollspy="{animation:'slide-bottom', delay: 0}">
                <h2>这是什么？</h2>
                <p>通过实时爬虫获取公开租房信息，直接在高德地图上直观展示房源位置+基础信息，同时提供住址到公司的路线计算（公交+地图 or 步行导航），已实现【豆瓣租房小组】、【Zuber合租平台】、【蘑菇租房】、【CCB建融家园】、【58同城品牌公寓】、【58同城诚信租房】、【上海互助租房】数据展示，部分房源价格支持筛选功能。</p>
            </hgroup>
            <ul class="am-avg-sm-2 am-avg-md-3 am-avg-lg-6 am-thumbnails">
                <li class="am-animation-slide-bottom am-animation-delay-1" data-am-scrollspy="{animation:'slide-top', delay: 20}">
                    <h2><a href="~/Home/HouseList?cityname=上海" target="_blank">上海地区</a></h2>
                    <p>
                        <a href="~/Home/HouseList?cityname=上海&source=huzhuzufang" target="_blank">互助租房、</a>
                        <a href="~/Home/HouseList?cityname=上海&source=douban" target="_blank">豆瓣、</a>
                        <a href="~/Home/HouseList?cityname=上海&source=zuber" target="_blank">Zuber</a>
                    </p>
                </li>
                <li class="am-animation-slide-top" data-am-scrollspy="{animation:'slide-top', delay: 0}">
                    <h2><a href="~/Home/HouseList?cityname=北京" target="_blank">北京地区</a></h2>
                    <p>
                        <a href="~/Home/HouseList?cityname=北京&source=douban" target="_blank">豆瓣、</a>
                        <a href="~/Home/HouseList?cityname=北京&source=zuber" target="_blank">Zuber、</a>
                        <a href="~/Home/HouseList?cityname=北京&source=mogu" target="_blank">蘑菇</a>
                    </p>
                </li>
                <li class="am-animation-slide-top" data-am-scrollspy="{animation:'slide-top', delay: 0}">
                    <h2><a href="~/Home/HouseList?cityname=广州" target="_blank">广州地区</a></h2>
                    <p>
                        <a href="~/Home/HouseList?cityname=广州&source=douban" target="_blank">豆瓣、</a>
                        <a href="~/Home/HouseList?cityname=广州&source=zuber" target="_blank">Zuber、</a>
                        <a href="~/Home/HouseList?cityname=广州&source=mogu" target="_blank">蘑菇</a>
                    </p>
                </li>
                <li class="am-animation-slide-top" data-am-scrollspy="{animation:'slide-top', delay: 0}">
                    <h2><a href="~/Home/HouseList?cityname=深圳" target="_blank">深圳地区</a></h2>
                    <p>
                        <a href="~/Home/HouseList?cityname=深圳&source=douban" target="_blank">豆瓣、</a>
                        <a href="~/Home/HouseList?cityname=深圳&source=zuber" target="_blank">Zuber</a>
                    </p>
                </li>
                <li class="am-animation-slide-top" data-am-scrollspy="{animation:'slide-top', delay: 100}">
                    <h2><a href="#" data-am-modal="{target: '#more-cityHouseInfo', closeViaDimmer: 0 ,width: 900,height:600}">更多城市</a></h2>
                    <p>
                        <a href="~/Home/HouseList?cityname=成都" target="_blank">成都、</a>
                        <a href="~/Home/HouseList?cityname=杭州" target="_blank">杭州、</a>
                        <a href="~/Home/HouseList?cityname=厦门" target="_blank">厦门...</a>
                    </p>
                </li>
                <li class="am-animation-slide-top" data-am-scrollspy="{animation:'slide-top', delay: 100}">
                    <h2><a href="#" data-am-modal="{target: '#divHouseSearch', closeViaDimmer: 0 ,width: 400, height : 320}">高级搜索</a></h2>
                    <p>支持关键字 + 信息来源 + 发布日期组合搜索.</p>
                </li>
            </ul>

            <ul class="am-avg-sm-2 am-thumbnails">
                <li class="am-animation-slide-top" data-am-scrollspy="{animation:'slide-top', delay: 200}" style="width:80%">
                    <h2><a href="#" data-am-modal="{target: '#addCityHouseInfo', closeViaDimmer: 0 ,width: 400,}">新增豆瓣租房小组</a></h2>
                    <p>你在的城市没有数据？没有对应的租房小组数据？试试手动添加爬虫任务吧！（如：厦门租房小组 https://www.douban.com/group/XMhouse/）</p>
                </li>
            </ul>

        </section>

    </div>


    <div class="am-modal am-modal-no-btn" tabindex="-1" id="divHouseSearch">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">
                高级搜索功能
                <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
            </div>
            <div class="am-modal-bd">

                <div class="am-form-group">
                    <select id="select-cityname" style="width:100%" class="am-text-lg">
                        @foreach (var cityName in Model.Select(city => city.CityName).Distinct())
                        {
                            <option value="@cityName">@cityName</option>
                        }
                    </select>
                </div>
                <div class="am-form-group">
                    <input style="width:45%;float:left;" class="am-text-lg am-input-lg" id="input-fromPrice" placeholder="最低价" text="0">
                    <label style="width:10%;float:left;">至</label>
                    <input style="width:45%;float:left;" class="am-text-lg am-input-lg" id="input-toPrice" placeholder="最高价"  text="0">
                </div>
                <div class="am-form-group">
                    <select id="select-source" style="width:100%" class="am-text-lg">
                        <option value="douban">豆瓣租房小组</option>
                        <option value="zuber">Zuber合租平台</option>
                        <option value="mogu">蘑菇租房</option>
                        <option value="ccbhouse">CCB建融家园</option>
                        <option value="huzhuzufang">上海互助租房</option>
                        <option value="pinpaigongyu">58同城品牌公寓</option>
                        <option value="">全部</option>

                    </select>
                </div>

                <div class="am-form-group">
                    <input style="width:100%" class="am-text-lg am-input-lg" id="input-withAnyDays" placeholder="几天内的数据？默认十天" value="10" type="number">
                </div>

                <div class="am-form-group">
                    <input style="width:100%" class="am-text-lg am-input-lg" id="input-keyword" placeholder="搜索关键字">
                </div>
                <button type="button" class="am-btn am-btn-default am-round am-btn-secondary am-btn-xl" id="btn-StartSearch">开始搜索...</button>
            </div>
        </div>
    </div>









    <div class="am-modal am-modal-no-btn" tabindex="-1" id="addCityHouseInfo">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">
                新增豆瓣租房小组
                <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
            </div>
            <div class="am-modal-bd">
                <div class="am-form-group">
                    <label>厦门租房:<a href="https://www.douban.com/group/XMhouse/ " target="_blank">www.douban.com/group/XMhouse</a></label>
                </div>
                <div class="am-form-group">
                    <input style="width:100%" class="am-text-lg am-input-lg" id="doc-ipt-cityName" placeholder="（如：厦门）">
                </div>
                <div class="am-form-group">
                    <input style="width:100%" class="am-text-lg" id="doc-ipt-douban" placeholder="（豆瓣小组GroupID,如：XMhouse）">
                </div>
                <button type="button" class="am-btn am-btn-default am-round am-btn-secondary am-btn-xl" id="btn-SaveDoubanGroup">添加此豆瓣小组数据</button>
            </div>
        </div>
    </div>


  <div class="am-modal am-modal-no-btn" tabindex="-1" id="setWorkAddress">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">
                设置上班地址
                <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
            </div>
            <div class="am-modal-bd">
                <div class="am-form-group">
                    <input style="width:100%" class="am-text-lg am-input-lg" id="workAddress"" placeholder="（如：淞虹路地铁站）" >
                </div>
                <button type="button" class="am-btn am-btn-default am-round am-btn-secondary" id="btn-SetWorkAddress">保存地址</button>
            </div>
        </div>
    </div>



       <div class="am-modal am-modal-no-btn" tabindex="-1" id="userHouseDashboards"></div>

       <div class="am-modal am-modal-no-btn house-list" tabindex="-1" id="userHouseList-modal"></div>

        <div class="am-modal am-modal-no-btn" tabindex="-1" id="more-cityHouseInfo">
            <div class="am-modal-dialog" style="width:900px;height:600px;overflow-y:scroll;">
                <div class="am-modal-hd">
                    全部城市
                    <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
                </div>
                <div class="am-modal-bd">
                    <ul class="am-avg-sm-2 am-avg-md-3 am-avg-lg-6 am-thumbnails" id="more-cityHouseInfo">
                        @foreach (var cityGroup in Model.GroupBy(c => c.CityName))
                        {
                            var cityName = cityGroup.First().CityName;
                            <li class="am-animation-slide-top">
                                <h2><a href="/Home/HouseList?cityname=@cityName" target="_blank">@cityName</a></h2>
                                <p>
                                    @foreach (var cityHouseInfo in cityGroup)
                                    {
                                        var sum = cityHouseInfo.HouseSum > 9999 ? "9999+" : cityHouseInfo.HouseSum.ToString();
                                        <a href="/Home/HouseList?cityname=@cityName&source=@cityHouseInfo.Source&intervalDay=14&houseCount=600" target="_blank">
                                            @cityHouseInfo.DisplaySource (@sum)
                                        </a>
                                        <br />
                                    }
                                </p>
                            </li>
                        }
                    </ul>
                </div>
            </div>
        </div>

        <hr>
        <section class="am-container m-home-box m-partner">

            <hgroup data-am-scrollspy="{animation:'slide-bottom', delay: 100}">
                <h2>感谢他们</h2>
                <p>
                    灵感+部分代码来源实验楼<a href="https://www.shiyanlou.com/user/8834/" target="_blank">ekCit</a>的
                    <a href="https://www.shiyanlou.com/courses/599" target="_blank">高德API+Python解决租房问题</a>课程，感谢他...
                </p>
            </hgroup>
            <ul class="am-avg-lg-8 am-avg-md-8 am-avg-sm-2  am-thumbnails" data-am-scrollspy="{animation:'slide-bottom', delay: 100}">
                <li data-am-scrollspy="{animation:'slide-bottom', delay: 72}">
                    <img src="~/hometemplate/views/IMJ2V2/images/microsoft.png" alt="微软" class="am-img-responsive">
                </li>
                <li data-am-scrollspy="{animation:'slide-bottom', delay: 44}">
                    <img src="~/hometemplate/views/IMJ2V2/images/tencent.png" alt="腾讯" class="am-img-responsive">
                </li>
                <li data-am-scrollspy="{animation:'slide-bottom', delay: 399}">
                    <img src="~/hometemplate/views/IMJ2V2/images/aliyun.png" alt="阿里云" class="am-img-responsive">
                </li>
            </ul>


        </section>



        <div class="m-services m-home-box" id="divContactLiguobao">
            <section class="am-container">
                <hgroup data-am-scrollspy="{animation:'slide-bottom', delay: 100}">
                    <h2>联系我？试试下面的方式咯。</h2>
                    @*<p>试试下面的方式咯。</p>*@
                </hgroup>
                <ul class="am-avg-lg-4 am-avg-md-4 am-avg-sm-2 am-thumbnails">
                    <li data-am-scrollspy="{animation:'slide-bottom', delay: 50}">
                        知乎：<a href="https://www.zhihu.com/people/codelover" target="_blank">李国宝</a>
                    </li>
                    <li data-am-scrollspy="{animation:'slide-bottom', delay: 50}">
                        GitHub: <a href=" https://github.com/liguobao/58HouseSearch" target="_blank">58HouseSearch</a>
                    </li>
                    <li data-am-scrollspy="{animation:'slide-bottom', delay: 50}">
                        邮件：codelover@qq.com
                    </li>
                </ul>

            </section>
            <br />
            <br />
            <br />
        </div>

        <div class="m-footer-bottom">
            <div class="am-container">
            <div class="am-g">
                <span class="m-u-sm-12 am-u-md-9 am-u-lg-10">Copyright 2016 - 2018 www.woyaozufang.live. All Rights Reserved <a href="http://www.miitbeian.gov.cn/" rel="external nofollow">粤ICP备18055424号</a> <a href="https://www.woyaozufang.live/">地图搜租房</a>
        </span>
                <span class="m-u-sm-12 am-u-md-3 am-u-lg-2 ico am-text-right am-hide-sm-only a">
                    <a href="" data-am-popover="{content: '88888888', trigger: 'hover focus'}" rel="nofollow"><i class="am-icon-qq"></i></a>
                    <a href="" data-am-popover="{content: '138-0000-0000', trigger: 'hover focus'}" rel="nofollow"><i class="am-icon-phone-square"></i></a>
                    <a href="" data-am-popover="{content: '138-0000-0000', trigger: 'hover focus'}" rel="nofollow"><i class="am-icon-weixin"></i></a>
                    <a href="" data-am-popover="{content: 'codelover@qq.com', trigger: 'hover focus'}" rel="nofollow"><i class="am-icon-envelope"></i></a>
                </span>
            </div>
            </div>
        </div>

        <!--[if lt IE 9]>
        <script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
        <script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
        <script src="views/IMJ2V2/js/polyfill/rem.min.js"></script>
        <script src="views/IMJ2V2/js/polyfill/respond.min.js"></script>
        <script src="views/IMJ2V2/js/amazeui.legacy.js"></script>
        <![endif]-->
        <script src="~/hometemplate/views/IMJ2V2/js/echo.min.js"></script>
        <script>
            echo.init({
                offset: 100,
                throttle: 250,
                unload: false,
                callback: function (element, op) {
                    console.log(element, 'has been', op + 'ed')
                }
            });
            // 图片赖加载
        </script>
        <!--[if (gte IE 9)|!(IE)]><!-->
        <script src="~/hometemplate/views/IMJ2V2/js/jquery.min.js"></script>
        <script src="~/hometemplate/views/IMJ2V2/js/amazeui.min.js"></script>
        <!--<![endif]-->
        <script src='~/hometemplate/views/IMJ2V2/js/jquery.qrcode.min.js'></script>
        <script type="text/javascript">
            $(function () {
                var str = "http://www.imj2.com";
                $("#code").qrcode({
                    render: "table",
                    width: 100,
                    height: 100,
                    text: str
                });

                $('#btn-SaveDoubanGroup').bind('click', function (e) {
                    e.preventDefault();
                    var doubanGroup = $('#doc-ipt-douban').val();
                    var cityName = $('#doc-ipt-cityName').val()
                    $('#btn-SaveDoubanGroup').attr("disabled", true);

                    $.ajax({
                        type: "post",
                        url: "../Home/AddDouBanGroup",
                        data: { doubanGroup: doubanGroup, cityName: cityName },
                        success: function (result) {
                            if (result.isSuccess) {
                                alert("新增成功！正在刷新数据...");
                                location.reload();
                            } else {
                                console.log(result.error);
                            }
                            $('#btn-SaveDoubanGroup').attr("disabled", false);
                        }
                    });

                    e.stopPropagation();
                });

                 $('#btn-SetWorkAddress').bind('click', function (e) {
                    e.preventDefault();
                    var workAddress = $('#workAddress').val();
                    $('#btn-SetWorkAddress').attr("disabled", true);

                    $.ajax({
                        type: "post",
                        url: "../Account/SetWorkAddress",
                        data: { address: workAddress },
                        success: function (result) {
                            if (result.success) {
                                alert("保存成功.");
                                location.reload();
                            } else {
                                console.log(result.error);
                            }
                            $('#btn-SetWorkAddress').attr("disabled", false);
                        }
                    });

                    e.stopPropagation();
                });



                $('#btn-StartSearch').bind('click', function (e) {
                    e.preventDefault();
                    var cityname = $('#select-cityname').val();
                    var source = $('#select-source').val();
                    var intervalDay = $('#input-withAnyDays').val();
                    var keyword = $('#input-keyword').val();
                    var fromPrice = $('#input-fromPrice').val();
                    var toPrice = $('#input-toPrice').val();

                    var searchHouseURL = "../Home/HouseList?cityname=" + cityname;

                    if (source && source != "") {
                        searchHouseURL = searchHouseURL + "&source=" + source;
                    }
                    if (intervalDay != "") {
                        searchHouseURL = searchHouseURL + "&intervalDay=" + intervalDay;
                    }
                    if (keyword && keyword != "") {
                        searchHouseURL = searchHouseURL + "&keyword=" + keyword;
                    }
                    if (fromPrice && fromPrice != "" && toPrice && toPrice!="") {
                        searchHouseURL = searchHouseURL + "&fromPrice=" + fromPrice + "&toPrice=" +toPrice;
                    }
                    window.open(searchHouseURL);
                    e.stopPropagation();
                });


                $('#userCenter').bind('click', function (e) {
                    e.preventDefault();

                    $.ajax({
                        type: "post",
                        url: '/Home/UserHouseDashboard',
                        data: {},
                        success: function (data) {
                            if (data) {
                                $('#userHouseDashboards').html(data);
                            }
                            $('#userHouseDashboards').modal('open');
                        }
                    });
                    e.stopPropagation();
                });

                $('#userSignOut').bind('click', function (e) {
                    e.preventDefault();
                    $.ajax({
                        type: "post",
                        url: '/Account/SignOut',
                        data: {},
                        success: function (result) {
                            if(result.success)
                            {
                                window.location.href = './'
                            }else
                            {
                                alert(rsp.error);
                            }
                        }
                    });
                    e.stopPropagation();
                });

                $('#userHouseList').bind('click', function (e) {
                    e.preventDefault();
                    $.ajax({
                        type: "post",
                        url: '/Home/UserHouseList',
                        data: {},
                        success: function (data) {
                            if (data) {
                                $('#userHouseList-modal').html(data);
                            }
                            $('#userHouseList-modal').modal('open');
                        }
                    });
                    e.stopPropagation();
                });


                if (document.getElementById("bdmark") != null) {
                    $('body').removeClass('is-mobile');
                }
                var urlhash = window.location.hash;
                if (!urlhash.match("fromapp")) {
                    if ((navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad|Mobile)/i))) {
                        $('body').addClass('is-mobile');
                    }
                }

            })

//end返回顶部
        </script>


</body>
</html>